package com.ley.yikang.service.serviceimpl;

import com.ley.yikang.entity.Action;
import com.ley.yikang.entity.Admin;
import com.ley.yikang.entity.CheckTask;
import com.ley.yikang.mapper.AdminMapper;
import com.ley.yikang.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {
    private final AdminMapper adminMapper;

    @Autowired
    public AdminServiceImpl(AdminMapper adminMapper) {
        this.adminMapper = adminMapper;
    }

    @Override
    public Admin findAdmin(Admin admin) {
        return adminMapper.findAdmin(admin);
    }

    @Override
    public Admin findAdminById(int id) {
        return adminMapper.findAdminById(id);
    }

    @Override
    public List<CheckTask> getAllCheckTask() {
        return adminMapper.getAllCheckTask();
    }

    @Override
    public List<Action> getAllAction() {
        return adminMapper.getAllAction();
    }
}
